<?php
include("connect.php");
$id=$_REQUEST['id'];
$sql="SELECT StartTime,EndTime FROM Activities WHERE ActID=$id";
mysqli_query($conn,"set names utf8mb4");
$result=mysqli_query($conn,$sql);
$data=Array();
class activity{
       	public $StartTime;
	public $EndTime;
}
        

while($row=mysqli_fetch_array($result,MYSQL_ASSOC)){
	$act=new activity();
        $act->StartTime=urlencode($row["StartTime"]);
	$act->EndTime=urlencode($row["EndTime"]);
	$data[]=$act;
}


$json=json_encode($data);
echo urldecode($json);
?>